function login() {
    let phone = $("#phone").val();
    let upwd = $("#upwd").val();
    if (phone != '' && upwd != '') {
        $.ajax({
            url: 'http://127.0.0.1:3000/login',
            type: 'post',
            data: { phone, upwd },
            success: res => {
                if (res.code == 200) {
                    alert('登录成功');
                } else {
                    alert('用户名或密码错误');
                }
            }
        });
    } else {
        alert('请输入正确的手机号/邮箱及密码');
    }
}